package Day2025_01_19;

import java.net.BindException;
import java.net.DatagramSocket;
import java.net.SocketException;

public class UDPEchoServer {
    private DatagramSocket socket;

    public UDPEchoServer(int port) throws SocketException {
        if (port < 1025 || port > 65535) {
            throw new BindException("端口号错误.");
        }
        this.socket = new DatagramSocket(port);
    }

    public void start () {
        System.out.println("服务器启动.");

    }
}
